/*
 
 */
package com.jme3.gde.gui.extra.xam.model.impl;

import com.jme3.gde.gui.extra.xam.model.NiftyAttribute;
import com.jme3.gde.gui.extra.xam.model.ElementTypeImpl;
import org.w3c.dom.Element;
import com.jme3.gde.gui.extra.xam.model.ControlType;
import com.jme3.gde.gui.extra.xam.model.ElementType;
import com.jme3.gde.gui.extra.xam.model.NiftyModel;
import com.jme3.gde.gui.extra.xam.model.NiftyQName;
import com.jme3.gde.gui.extra.xam.model.visitor.NiftyComponentVisitor;	

/**
 * Implementation for domain component controlType.
 * 
 * @author cuongnguyen
 */
// Generated by XAM AutoGen Tool v0.2
public class ControlTypeImpl extends ElementTypeImpl implements ControlType {

    public ControlTypeImpl(NiftyModel model, Element element) {
        super(model, element);
    }
    
    public ControlTypeImpl(NiftyModel model) {
        this(model, createElementNS(model, NiftyQName.CONTROLTYPE));
    }

    // attributes

    public String getOnChange() {
        return getAttribute(NiftyAttribute.ONCHANGE);
    }

    public void setOnChange(String onChange) {
        setAttribute(ONCHANGE_PROPERTY, NiftyAttribute.ONCHANGE, onChange);
    }

    // child elements

    public void accept(NiftyComponentVisitor visitor) {
        visitor.visit(this);
    }
    public void setName(String name) {
        setAttribute(NAME_PROPERTY, NiftyAttribute.NAME, name);
    }

    public String getName() {
        return getAttribute(NiftyAttribute.NAME);
    }
}